<template>
  <div class="admin-dashboard-container">
    <el-card shadow="hover">
      <div class="header">
        <h2>管理员仪表盘</h2>
      </div>
      <div class="dashboard-stats">
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">项目总数</div>
          <div class="stat-value">32</div>
        </el-card>
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">学生总数</div>
          <div class="stat-value">120</div>
        </el-card>
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">教师总数</div>
          <div class="stat-value">18</div>
        </el-card>
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">待审核项目</div>
          <div class="stat-value">5</div>
        </el-card>
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">公告数</div>
          <div class="stat-value">8</div>
        </el-card>
        <el-card class="stat-card" shadow="never">
          <div class="stat-title">财务总额(元)</div>
          <div class="stat-value">¥100,000</div>
        </el-card>
      </div>
      <div class="dashboard-links">
        <el-button type="primary" @click="go('/admin/students')">学生管理</el-button>
        <el-button type="primary" @click="go('/admin/teachers')">教师管理</el-button>
        <el-button type="primary" @click="go('/admin/projects')">项目管理</el-button>
        <el-button type="primary" @click="go('/admin/votes')">投票管理</el-button>
        <el-button type="primary" @click="go('/admin/statistics')">统计管理</el-button>
        <el-button type="primary" @click="go('/admin/finances')">财务管理</el-button>
        <el-button type="primary" @click="go('/admin/posts')">公告管理</el-button>
      </div>
    </el-card>
    <router-view />
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router';
const router = useRouter();
function go(path) {
  router.push(path);
}
// 可根据实际数据动态获取统计数
</script>
<style scoped>
.admin-dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 0;
  background: #f5f7fa;
  min-height: 100vh;
}
.header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.dashboard-stats {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.stat-card {
  flex: 1 1 200px;
  min-width: 200px;
  text-align: center;
  padding: 24px 0;
}
.stat-title {
  font-size: 16px;
  color: #888;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #409EFF;
}
.dashboard-links {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
</style> 